package com.yaodian100.ec.giftcard.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_GIFTCARD_RECEIVE_MAIN")
public class GiftcardReceiveMain extends BaseEntity {
	
	/** serial version */
	private static final long serialVersionUID = 3305768547575541372L;

	/** 禮品卡領用單主檔編號 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_giftcard_receive_main")
	@SequenceGenerator(name = "seq_ec_giftcard_receive_main", sequenceName = "SEQ_EC_GIFTCARD_RECEIVE_MAIN")
	@Column(name = "RECEIVE_ID")
	private Long receiveId;
	
	/** 申請人 */
	@Column(name = "APPLY_USER", length = 30)
	private String applyUser;
	
	/** 申請日期 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "APPLY_DATE")
	private Date applyDate;
	
	/** 申請張數 */
	@Column(name = "APPLY_COUNT")
	private int applyCount;
	
	/** 申請說明 */
	@Column(name = "APPLY_DESC", length = 255)
	private String applyDesc;
	
	/**
	 * 狀態
	 * 申请中 00
	 * 已出庫 40
	 * 已核可 50
	 * 未核可 90
	 */
	@Column(name = "STATUS", length = 6)
	private String status;
	
	/** 領用總額 */
	@Column(name = "RECEIVE_TOTAL", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal receiveTotal;
	
	/** 領用日期 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "RECEIVE_DATE")
	private Date receiveDate;
	
	/** 領用處理人 */
	@Column(name = "RECEIVE_USER", length = 30)
	private String receiveUser;
	
	/** 核可處理人 */
	@Column(name = "APPROVE_USER", length = 30)
	private String approveUser;
	
	/** 核可日期 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "APPROVE_DATE")
	private Date approveDate;
	
	/** 不核可原因 */
	@Column(name = "DISAPPROVE_REASON", length = 255)
	private String disapproveReason;
	
	//getter & setter
	public Long getReceiveId() {
		return receiveId;
	}

	public void setReceiveId(Long receiveId) {
		this.receiveId = receiveId;
	}

	public String getApplyUser() {
		return applyUser;
	}

	public void setApplyUser(String applyUser) {
		this.applyUser = applyUser;
	}

	public Date getApplyDate() {
		return applyDate;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public int getApplyCount() {
		return applyCount;
	}

	public void setApplyCount(int applyCount) {
		this.applyCount = applyCount;
	}

	public String getApplyDesc() {
		return applyDesc;
	}

	public void setApplyDesc(String applyDesc) {
		this.applyDesc = applyDesc;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public BigDecimal getReceiveTotal() {
		return receiveTotal;
	}

	public void setReceiveTotal(BigDecimal receiveTotal) {
		this.receiveTotal = receiveTotal;
	}

	public Date getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}

	public String getReceiveUser() {
		return receiveUser;
	}

	public void setReceiveUser(String receiveUser) {
		this.receiveUser = receiveUser;
	}

	public String getApproveUser() {
		return approveUser;
	}

	public void setApproveUser(String approveUser) {
		this.approveUser = approveUser;
	}

	public Date getApproveDate() {
		return approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	public String getDisapproveReason() {
		return disapproveReason;
	}

	public void setDisapproveReason(String disapproveReason) {
		this.disapproveReason = disapproveReason;
	}
}